import request from '@/utils/request'
// 文章详情获取
export const articles = id => {
  return request({
    url: `/v1_0/articles/${id}`
  })
}
// 获取文章评论
export const comments = params => {
  return request({
    url: '/v1_0/comments',
    params
  })
}

// 发表评论
export const commentsPost = data => {
  return request({
    url: '/v1_0/comments',
    method: 'post',
    data
  })
}

// 点赞
export const commentLikings = data => {
  return request({
    url: '/v1_0/comment/likings',
    method: 'post',
    data
  })
}
// 取消点赞
export const commentLikingsDelete = target => {
  return request({
    url: `/v1_0/comment/likings/${target}`,
    method: 'delete'
  })
}
